ARD2  1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
ME.c File Reference

Mode Entry Module The ME controls the device mode and mode transition sequences in all functional states. It also contains configuration, control and status registers accessible for the application. More...

#include "derivative.h"
#include "Compile_Options.h"
#include "ME.h"

Functions

uint8_t u8fnInitDefaultPeripheralPresets (void)
 Loads default configuration for peripheral behavior in different power situations (namely RUN, low power and debug).
uint8_t u8fnConfigPeripheralForMCUModePreset (const uint8_t u8PeripheralIndex, const uint8_t u8ConfigurationIndex)
 Ties in together a peripheral with a configuration.
uint8_t u8fnCurrentOperationMode (void)
 Returns the current operation mode as described by ME_VALID_OP_MODES.
uint8_t u8fnInitDefaultOpModes (void)
 Configures operation modes according to cau32RunModeConfig, cu32Halt0ModeConfig, and cu32Stop0ModeConfig.
uint8_t u8fnSwitchOpModes (const uint8_t u8Mode)
 Switches from the current operation mode to another one as indicated by the passed argument.

Detailed Description

Mode Entry Module The ME controls the device mode and mode transition sequences in all functional states. It also contains configuration, control and status registers accessible for the application.

Copyright (c) 2011 Freescale Semiconductor Freescale Confidential Proprietary

Author:
Freescale Semiconductor
SASD Automotive
R11515
Version:
Date:
Warning:
(If needed)

History:


Function Documentation

uint8_t u8fnConfigPeripheralForMCUModePreset ( const uint8_t  u8PeripheralIndex,
const uint8_t  u8ConfigurationIndex 
)

Ties in together a peripheral with a configuration.

Parameters:
None
Returns:
Clear if successful, ME_INVALID_INDEX if passed arguments are out of spec.
uint8_t u8fnCurrentOperationMode ( void  )

Returns the current operation mode as described by ME_VALID_OP_MODES.

Parameters:
None
Returns:
Operation mode as described by ME_VALID_OP_MODES
uint8_t u8fnInitDefaultOpModes ( void  )

Configures operation modes according to cau32RunModeConfig, cu32Halt0ModeConfig, and cu32Stop0ModeConfig.

Parameters:
None
Returns:
CLEAR if everything went ok; ME_HW_NOT_READY if in the middle of a transition (command didn't take), or ME_INVALID_RUN_MODE if current mode is not DRUN_MODE.
uint8_t u8fnInitDefaultPeripheralPresets ( void  )

Loads default configuration for peripheral behavior in different power situations (namely RUN, low power and debug).

Parameters:
None
Returns:
Clear if successful, ME_HW_NOT_READY if there's another operation going on.
Note:
Current implementation only allows for solutions as described in enum ME_PERIPHERAL_PRESETS.
uint8_t u8fnSwitchOpModes ( const uint8_t  u8Mode)

Switches from the current operation mode to another one as indicated by the passed argument.

Parameters:
u8Mode,:Next operation mode index as described by ME_VALID_OP_MODES
Returns:
CLEAR if everything went ok; ME_OP_MODE_CHANGE_DIDNT_OCCUR if we timed-out.